<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>三列布局</title>
  <style>
    .left {
      float: left;
      width: 200px;
      height: 200px;
      background-color: red;
    }

    .right {
      float: right;
      width: 200px;
      height: 200px;
      background-color: blue;
    }

    .center {
      /* 宽度自适应 */
      height: 400px;
      background-color: green;
      /* 1、使用边距 */
      margin: 0 200px;
      /* 2、触发bfc-谁想要自适应，谁用bfc*/
      overflow: hidden;
    }
  </style>
</head>

<body>
  <!-- 左右定宽、中间自适应，所有center需要放在第三个 -->
  <div class="left"></div>
  <div class="right"></div>
  <div class="center">我是中间</div>

</body>

</html>